package com.xinxi11.project.qx.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.xinxi11.module.core.entity.RecordSupport;

/**
 * 角色_模块关联表 同时保存分配的角色与模块对应的操作权限与属性列表权限 更新分两步操作:状态删除上一条记录,新建更新后的记录
 */
@Entity
@Table(name = "qxre_role_module")
public class QxreRoleModule extends RecordSupport<String> {

	private static final long serialVersionUID = -1420931288792880310L;
	/** 角色ID **/
	private String roleId;
	/** 模块ID **/
	private String moduleId;
	/** 对应的操作IDs,","分割 **/
	private String operationIds;
	/** 对应的被分配的属性的IDs,","分割 **/
	private String fieldIds;

	/** default constructor */
	public QxreRoleModule() {
	}

	/** minimal constructor */
	public QxreRoleModule(String id) {
		this.id = id;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false, length = 50)
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {
		return this.id;
	}

	@Column(name = "roleId", length = 50)
	public String getRoleId() {
		return this.roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	@Column(name = "moduleId")
	public String getModuleId() {
		return this.moduleId;
	}

	public void setModuleId(String moduleId) {
		this.moduleId = moduleId;
	}

	@Column(name = "operationIds", length = 1000)
	public String getOperationIds() {
		return this.operationIds;
	}

	public void setOperationIds(String operationIds) {
		this.operationIds = operationIds;
	}

	@Column(name = "fieldIds", length = 2000)
	public String getFieldIds() {
		return this.fieldIds;
	}

	public void setFieldIds(String fieldIds) {
		this.fieldIds = fieldIds;
	}
}